<!doctype html>
<jsp:directive.page import="com.cn.ccp.bean.UserBean" />
<%@page contentType="text/html;charset=UTF-8"%>
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@taglib uri="https://ajax4jsf.dev.java.net/ajax" prefix="a4j"%>
<%@page isELIgnored="false" %>
<html >
<f:view>
<f:loadBundle var="messages" basename="messages"></f:loadBundle>
<head>
<meta charset="utf-8">
<title><h:outputText value="#{messages['system_title']}" /></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <!-- styles -->
    <link href="<%=request.getContextPath()%>/css/bootstrap.css" rel="stylesheet">
    <link href="<%=request.getContextPath()%>/css/bootstrap-responsive.css" rel="stylesheet">
    <link href="<%=request.getContextPath()%>/css/custom.css" rel="stylesheet">
    <!--[if lt IE 9]>
      <script src="<%=request.getContextPath()%>/js/html5.js"></script>
    <![endif]-->
    <!-- Fav and touch icons -->
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="<%=request.getContextPath()%>/images/icon/apple-touch-icon-144-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="<%=request.getContextPath()%>/images/icon/apple-touch-icon-114-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="<%=request.getContextPath()%>/images/icon/apple-touch-icon-72-precomposed.png">
    <link rel="apple-touch-icon-precomposed" href="<%=request.getContextPath()%>/images/icon/apple-touch-icon-57-precomposed.png">
    <link rel="shortcut icon" href="<%=request.getContextPath()%>/images/icon/favicon.png">
    <link rel="stylesheet"
	href="<%=request.getContextPath()%>/plugins/code/prettify.css" />
<script charset="utf-8"
	src="<%=request.getContextPath()%>/kindeditor.js"></script>
<script charset="utf-8"
	src="<%=request.getContextPath()%>/lang/zh_CN.js"></script>
<script charset="utf-8"
	src="<%=request.getContextPath()%>/plugins/code/prettify.js"></script>
<script type="text/javascript"
	src="<%=request.getContextPath()%>/flexpaper/js/flexpaper_flash.js"></script>
   
</head>
<h:inputHidden value="#{onlineDetailAction.initData}"></h:inputHidden>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"+ request.getServerName() + ":"+ request.getServerPort() + path + "/";
	String  outline = (String)session.getAttribute("outlineFilePath") ;
	String  eval = (String)session.getAttribute("evaluFilePath") ;
	String outlineUrl = basePath + "tempfile/outline/"+session.getAttribute("outlineFilePath");
	String evaluUrl = basePath + "tempfile/evaluation/"+session.getAttribute("evaluFilePath");
	String  outlineIsPDF = ""+outlineUrl.toUpperCase().endsWith(".PDF");
	String evaluIsPDF = ""+evaluUrl.toUpperCase().endsWith(".PDF");
%>
	
	
<base href="<%=basePath%>">
<body class="bg-white" onload="showOutline()" style="overflow-x:hidden;">
	<h:form id="formid">
		 
		
		<h:inputHidden value="#{onlineDetailAction.selectCourseId}" ></h:inputHidden>
		<h:inputHidden value="#{onlineDetailAction.courseId}" id="courseId"></h:inputHidden>
		<h:inputHidden value="#{onlineDetailAction.showEditOutline}" id="showEditOutlineFlagId"></h:inputHidden>
		<h:inputHidden value="#{onlineDetailAction.showEditEvaluation}" id="showEditEvaluationId"></h:inputHidden>
		<div class="row page-head">
			<h3 class="page-title">
				<i class="n-icon-selection  n-icon-black"></i><h:outputText value="#{messages['online_page_title']}"/>
			</h3>
		</div>
		<div style="margin-left: 20px;margin-right: 20px">
		 	<div class="see-info row-fluid">
               	<div class="span3">
                 	 <h:graphicImage id="image" url="/tempfile/#{onlineDetailAction.course.image}" height="190px" width="156px"></h:graphicImage>
                 </div>
                  <dl class="dl-horizontal span8">
                    <dt><h:outputText value="#{messages['online_page_select_action_browse_couse_name']}"/></dt>
                    <dd>&nbsp;<h:outputText value="#{onlineDetailAction.course.course_name}"/></dd>
                                       
                    <dt><h:outputText value="#{messages['online_page_select_action_browse_teacher']}"/></dt>
                    <dd>&nbsp;<h:outputText value="#{onlineDetailAction.course.teacherName}"/></dd>
                                       
                    <dt><h:outputText value="#{messages['online_page_select_action_browse_star_level']}"/></dt>
                    <dd>&nbsp;<h:outputText value="#{onlineDetailAction.course.start_level}"/><h:outputText value="#{messages['online_page_select_star']}"/></dd>
                    
                    <dt><h:outputText value="#{messages['online_page_select_action_browse_students']}"/></dt>
                    <dd>&nbsp; 
                    	<h:outputFormat value="#{messages['online_page_select_action_browse_students_number']}">
						   <f:param value="#{onlineDetailAction.course.studyUsers}"/> 
						</h:outputFormat>
                    
                    </dd>
                    
                  </dl>

              </div>
		       <a id="viewDiv"></a>	
			   <ul class="nav nav-tabs" id="myTab">
                  <li id="basicInfo-li" class="active" ><a href="#basicInfo"><h:outputText value="#{messages['online_page_select_action_browse_tab_base']}"/></a></li>
                  <li id="teacher-li"><a href="#teacher"><h:outputText value="#{messages['online_page_select_action_browse_tab_teacher']}"/></a></li>
                  <li id="curriculum-li"><a href="#curriculum"><h:outputText value="#{messages['online_page_select_action_browse_tab_course']}"/></a></li>
                  <li id="student-li"><a href="#student"><h:outputText value="#{messages['online_page_select_action_browse_tab_judge']}"/></a></li>
                  <li id="outline-li"><a href="#outline" onclick="onLoadOutline();">&nbsp;&nbsp;&nbsp;<h:outputText value=" #{messages['course_page_course_outline_title']} "/>&nbsp;&nbsp;&nbsp;</a></li>
                  <li id="evalu-li"><a href="#evaluationDiv" onclick="onLoadEvalu();"><h:outputText value=" #{messages['course_page_course_evaluation_title']} "/></a></li>
                  <li id="homework-li"><a href="#homeworkDiv">&nbsp;&nbsp;&nbsp;<h:outputText value=" #{messages['course_page_course_training']} "/>&nbsp;&nbsp;&nbsp;</a></li>
                  <li id="invest-li"><a href="#investDiv">&nbsp;&nbsp;&nbsp;<h:outputText value=" #{messages['course_page_course_survey_title']} "/>&nbsp;&nbsp;&nbsp;</a></li>
                  <li id="assessmentA-li"><a href="#assessmentA" >&nbsp;&nbsp;&nbsp;<h:outputText value="#{messages['course_page_course_notice_btn']}" />&nbsp;&nbsp;&nbsp;</a></li>
                  <li id="courseBBS-li"><a href="#courseBBS" >&nbsp;&nbsp;&nbsp;<h:outputText value="#{messages['pages_bbs_title']}" />&nbsp;&nbsp;&nbsp;</a></li>
              </ul>
		
			<div class="tab-content">
				 <div class="tab-pane active" id="basicInfo">
               		 	<fieldset>
               		 		 <div class="form-white label-auto">
               		 		 	<div class="control-group  no-mb">
                                  <label class="control-label" for=""><h:outputText value="#{messages['online_page_select_action_browse_des']}"/></label>
                                  <div class="controls">
                                    <label class="control-label label-w-auto"><h:outputText value="#{onlineDetailAction.course.descripte}" escape="false"/></label>
                                    <span class="help-inline"></span>
                                  </div>
                                </div>
               		 		 </div>
               		 	</fieldset>
               	 </div>
               	 
               	 <div class="tab-pane" id="teacher">
              		 <fieldset>
               		 	<div class="form-white label-auto">
             		 		 	<div class="control-group  no-mb">
                                <label class="control-label" for=""></label>
                                <div class="controls">
                                  <label class="control-label label-w-auto"><h:outputText value="#{onlineDetailAction.course.teacherDes}"   style="word-break:break-all" styleClass="outputText"></h:outputText></label>
                                </div>
                              </div>
             		 	</div>
              		 </fieldset> 
               	</div>
               	
               	 <div class="tab-pane" id="curriculum" >
					<div class="accordion" id="accordion1"><!-- accordion -->
		           			<a4j:outputPanel id="refresh">
		           				<a4j:repeat var="content"
										value="#{onlineDetailAction.courseChapterList}">
										<h:outputText value="#{content.title1}" escape="false"></h:outputText>
	
										<h:outputText value="#{content.title2}" escape="false"></h:outputText>
	
										<a4j:repeat var="contentVar" value="#{content.ccList}">
											<f:verbatim>
												<li>
											</f:verbatim>
	
											<h:commandLink style="margin-left: 20px"
												value="#{contentVar.section_file_name}[#{contentVar.section_file_type}]"
												action="#{onlineDetailAction.showCourseContent}">
												<f:param name="courseDetailId" value="#{contentVar.id}"></f:param>
												<f:param name="courseId" value="#{contentVar.course_id}"></f:param>
											</h:commandLink>
											<h:outputText styleClass="n14-icon-ok" rendered="#{contentVar.haveStudty == true}"></h:outputText>
											<f:verbatim>
												</li>
											</f:verbatim>
										</a4j:repeat>
										
										<a4j:repeat var="cmVar" value="#{content.xjMList}">
											<f:verbatim>
												<li>
											</f:verbatim>
											<h:outputText value="#{cmVar.xtitle1}" escape="false"></h:outputText>
												<a4j:repeat var="mv" value="#{cmVar.ccmList}">
													<f:verbatim>
														<li>
													</f:verbatim>
													<h:commandLink style="margin-left: 20px"
														value="#{mv.section_file_name}[#{mv.section_file_type}]"
														action="#{onlineDetailAction.showCourseContent}">
														<f:param name="courseDetailId" value="#{mv.id}"></f:param>
														<f:param name="courseId" value="#{mv.course_id}"></f:param>
													</h:commandLink>
													<h:outputText styleClass="n14-icon-ok" rendered="#{mv.haveStudty == true}"></h:outputText>
													<f:verbatim>
														</li>
													</f:verbatim>
												</a4j:repeat>
											<h:outputText value="#{cmVar.xtitle2}" escape="false"></h:outputText>
											<f:verbatim>
												</li>
											</f:verbatim>
										
										</a4j:repeat>
										
										<h:outputText value="#{content.title3}" escape="false"></h:outputText>
									</a4j:repeat>
		           			</a4j:outputPanel>
			      	 	</div>
					</div>
               	 
             	 <div class="tab-pane" id="student">
                	<div class="table-white">
					<h:dataTable id="listtableinfo"
						value="#{onlineDetailAction.markedList}" var="cour" cellpadding="2"
						cellspacing="1" styleClass="table table-hover" >
						<h:column>
								<f:facet name="header">
									<h:outputText value=""></h:outputText>
								</f:facet>
								<h:outputText value=""></h:outputText>
							</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="#{messages['online_page_select_star_level']}"></h:outputText>
							</f:facet>
							<h:outputText value="#{cour.starLevel}"></h:outputText>
						</h:column>
						
						<h:column>
							<f:facet name="header">
								<h:outputText value="#{messages['online_page_select_marked_content']}"></h:outputText>
							</f:facet>
							<h:outputText value="#{cour.content}"></h:outputText>
						</h:column>
									
						<h:column>
							<f:facet name="header">
								<h:outputText value="#{messages['online_page_select_marked_time']}"></h:outputText>
							</f:facet>
							<h:outputText value="#{cour.markTime}"></h:outputText>
						</h:column>	
						
						<h:column>
							<f:facet name="header">
								<h:outputText value="#{messages['online_page_select_marked_student']}"></h:outputText>
							</f:facet>
							<h:outputText value="#{cour.strStudentName}"></h:outputText>
						</h:column>			
									
					</h:dataTable>
				</div>		
                	
                </div>
	                 
                 <div class="tab-pane" id="outline">
					<div class="list-white">
						<h:outputText id="showOutlineDiv" escape="false" rendered="#{onlineDetailAction.showEditOutline}" value="#{onlineDetailAction.outline}"></h:outputText>
						<%
							String url = outlineUrl.toUpperCase() ;
							if(url.endsWith(".PDF")){
						%>
							<div id="pdfDivID" style="margin-left:60px;width:900px;height:800px;display: none">
								<!--[if IE]>  
								    <object classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" width="100%" height="1050" border="0">   
								        <param name="_Version" value="65539">  <param name="_ExtentX" value="20108">  
								        <param name="_ExtentY" value="10866">  <param name="_StockProps" value="0">  
								        <param name="SRC" value="<%=outlineUrl%>">  
								    </object>  
								 <![endif]-->
								 <!--[if !IE]> <!-->  
									<object data="<%=outlineUrl%>" type="application/pdf" width="100%" height="800px">  
								    	alt : <a href='http://get.adobe.com/cn/reader'>Adobe Reader.pdf </a>  
								    </object> 
								 <!-- <![endif]-->
							</div>
						<%
							}else{
						%>
							<div id="viewerPlaceHolder" style="display: none;width:900px;height:800px;"> </div>  
						<%
							}
						%>
					</div>
				</div>
					
				<div class="tab-pane" id="evaluationDiv">
					<div class="list-white">
						<h:outputText escape="false" rendered="#{onlineDetailAction.showEditEvaluation}" value="#{onlineDetailAction.courseEva}"></h:outputText>
						<%
							String vurl = evaluUrl.toUpperCase() ;
							if(vurl.endsWith(".PDF")){
						%>
							<div id="pdfEvaluDivID" style="margin-left:60px;width:900px;height:800px;display: none">
								<!--[if IE]>  
								    <object classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" width="100%" height="1050" border="0">   
								        <param name="_Version" value="65539">  <param name="_ExtentX" value="20108">  
								        <param name="_ExtentY" value="10866">  <param name="_StockProps" value="0">  
								        <param name="SRC" value="<%=evaluUrl%>">  
								    </object>  
								 <![endif]-->
								 <!--[if !IE]> <!-->  
									<object data="<%=evaluUrl%>" type="application/pdf" width="100%" height="800px">  
								    	alt : <a href='http://get.adobe.com/cn/reader'>Adobe Reader.pdf </a>  
								    </object> 
								 <!-- <![endif]-->
							</div>
						<%
							}else{
						%>
							<div id="viewerEvaluDiv" style="width:900px;height:800px;display: none"></div>
						<%
							}
						%>
					</div>
				</div>
					
                <div class="tab-pane" id="homeworkDiv">
                	 <div class="table-white"> 
                	 	<h:dataTable id="listHomework" columnClasses="list-column1-center"
						value="#{onlineDetailAction.homeworkList}" var="cour" styleClass="table table-hover" >
						<h:column>
								<f:facet name="header">
									<h:outputText value=""></h:outputText>
								</f:facet>
								<h:outputText value=""></h:outputText>
							</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="#{messages['course_page_course_name']}"></h:outputText>
							</f:facet>
							<h:commandLink action="#{homeworkAction.doTraining}" style="text-align: -webkit-left;">
								<h:outputText value="#{cour.courseName}" ></h:outputText>
								<f:param name="courseId" value="#{onlineDetailAction.courseId}"></f:param>
			                    <f:param name="selectedCourseId" value="#{onlineDetailAction.selectCourseId}"></f:param>
			                    <f:param name="settingId" value="#{cour.id}"></f:param>
							</h:commandLink>
						</h:column>
						
						<h:column>
							<f:facet name="header">
								<h:outputText value="#{messages['teaching_group_pages_name']}"></h:outputText>
							</f:facet>
							<h:outputText value="#{cour.title}"></h:outputText>
						</h:column>
														
						<h:column>
							<f:facet name="header">
								<h:outputText value="#{messages['course_page_approve_status']}"></h:outputText>
							</f:facet>
							<h:outputText value="#{cour.isDone}"></h:outputText>
						</h:column>
					</h:dataTable>
                	 </div>
                </div>
	                 
                <div class="tab-pane" id="investDiv">
                	 <div class="table-white">
					<h:dataTable id="listInvest"
						value="#{onlineDetailAction.investList}" var="cour"  styleClass="table table-hover" >
						<h:column>
								<f:facet name="header">
									<h:outputText value=""></h:outputText>
								</f:facet>
								<h:outputText value=""></h:outputText>
							</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="#{messages['course_page_course_name']}"></h:outputText>
							</f:facet>
							<h:commandLink action="#{evaluationAction.goEvaluationPages}" rendered="#{cour.hasDone == 'false'}">
								<h:outputText value="#{cour.courseName}" ></h:outputText>
								<f:param name="courseId" value="#{onlineDetailAction.courseId}"></f:param>
			                    <f:param name="selectedCourseId" value="#{onlineDetailAction.selectCourseId}"></f:param>
			                    <f:param name="settingId" value="#{cour.id}"></f:param>
							</h:commandLink>
							<h:outputText value="#{cour.courseName}" rendered="#{cour.hasDone == 'true'}"></h:outputText>
						</h:column>
						
						<h:column>
							<f:facet name="header">
								<h:outputText value="#{messages['teaching_group_pages_name']}"></h:outputText>
							</f:facet>
							<h:outputText value="#{cour.title}"></h:outputText>
						</h:column>
														
						<h:column>
							<f:facet name="header">
								<h:outputText value="#{messages['course_page_approve_status']}"></h:outputText>
							</f:facet>
							<h:outputText value="#{cour.isDone}"></h:outputText>
						</h:column>
														
						 
					</h:dataTable>	                 	 
                	 </div>
                </div>
               	 
	            <div class="tab-pane" id="assessmentA">
					<div class="list-white">
						<a4j:outputPanel ajaxRendered="true">
	         					<a4j:repeat id="repeatid" var="content" value="#{onlineDetailAction.noticeList}" >
	         						<f:verbatim>
	         							<div class="alert alert-info">
	                            </f:verbatim>
	                            <h:outputText value="#{content.notice}" escape="false" ></h:outputText>
	                            <f:verbatim>
	                            	<br/>
	                            	<strong>
	                            </f:verbatim>
	                            <h:outputText value="#{content.createTime}" escape="false" ></h:outputText>
	                            <f:verbatim>
	                           		 </strong>
	 								</div>
	                          	</f:verbatim>
	          				</a4j:repeat>
	          			</a4j:outputPanel>
					</div>
				</div>		
				<!-- course bbs -->
				<div class="tab-pane" id="courseBBS">
                 	<div class="table-white">
                 		<h:commandLink action="#{courseForumAction.addBBS}" styleClass="btn btn-success" >
                 			<h:outputText value="#{messages['pages_bbs_btn_send_bbs']}" ></h:outputText>
                 			<f:param name="type" value="online" />
                 			<f:param name="courseId" value="#{onlineDetailAction.courseId}"></f:param>
			                <f:param name="selectedCourseId" value="#{onlineDetailAction.selectCourseId}"></f:param>
                 		</h:commandLink>
							<div>
								<h:dataTable id="listtableinfobbs"
									value="#{courseForumAction.list}" var="roles" cellpadding="2"
									cellspacing="1" styleClass="table table-hover" >
									<h:column>
										<f:facet name="header">
											<h:outputText value="#"></h:outputText>
										</f:facet>
										<h:outputText value="#{roles.index}"></h:outputText>
									</h:column>
									
									<h:column>
										<f:facet name="header">
											<h:outputText value="#{messages['label_title']}"></h:outputText>
										</f:facet>
										<h:commandLink action="#{courseForumReplyAction.showContent}" styleClass="text-info">
											<h:outputText value="#{roles.title}"></h:outputText>
											<f:param name="id" value="#{roles.id}" />
											<f:param name="type" value="online" />
											<f:param name="courseId" value="#{onlineDetailAction.courseId}"></f:param>
			                    			<f:param name="selectedCourseId" value="#{onlineDetailAction.selectCourseId}"></f:param>
										</h:commandLink>
									</h:column>
									
									<h:column >
										<f:facet name="header">
											<h:outputText value="#{messages['pages_bbs_title_author']}"></h:outputText>
										</f:facet>
										<h:outputText value="#{roles.userName}"></h:outputText>
									</h:column>
									
									
									<h:column >
										<f:facet name="header">
											<h:outputText value="#{messages['pages_bbs_title_reply']}/#{messages['pages_bbs_title_selec']}"></h:outputText>
										</f:facet>
										<h:outputText value="#{roles.replyTimes}/#{roles.seeTimes}"></h:outputText>
									</h:column>
									
									<h:column >
										<f:facet name="header">
											<h:outputText value="#{messages['pages_bbs_title_last_time']}"></h:outputText>
										</f:facet>
										<h:outputText value="#{roles.updateTime}"></h:outputText>
									</h:column>
									
								</h:dataTable>
								
								<h:panelGrid columns="2" styleClass="pagination pagination-right" style="align:right" >
									<h:panelGrid columns="4" >
										<a4j:commandLink action="#{courseForumAction.firstPage}" styleClass="icon-fast-backward"  reRender="listtableinfobbs"></a4j:commandLink>
										<a4j:commandLink action="#{courseForumAction.provPage}" styleClass="icon-backward" reRender="listtableinfobbs"></a4j:commandLink>
										<a4j:commandLink action="#{courseForumAction.nextPage}" styleClass="icon-forward" reRender="listtableinfobbs"></a4j:commandLink>
										<a4j:commandLink action="#{courseForumAction.lastPage}" styleClass="icon-fast-forward" reRender="listtableinfobbs"></a4j:commandLink>
									</h:panelGrid>
									<h:panelGroup>
										<a4j:outputPanel ajaxRendered="true">
											<h:inputText value="#{courseForumAction.currentPage}" size="3" styleClass="input" style="width:20px"></h:inputText>
											<h:outputText value="/#{courseForumAction.countPage}#{messages['label_page']}"></h:outputText>
						
											<a4j:commandLink action="#{courseForumAction.goCurrentPage}"
												reRender="listtableinfobbs">
												<h:graphicImage value="/images/BtnPageGo.gif"></h:graphicImage>
											</a4j:commandLink>
											<h:outputText value="#{messages['label_all']}#{courseForumAction.itemCount}#{messages['label_count']}"></h:outputText>
										</a4j:outputPanel>
									</h:panelGroup>
								</h:panelGrid>
							</div>
					</div>		
                 	
                 </div>
				<!-- end course bbs -->
			</div>
		
			<div class="form-actions">
				<h:commandButton value="#{messages['btn_back']}" styleClass="btn btn-primary" action="#{onlineDetailAction.goBack}" />
				<h:commandButton value="#{messages['btn_cancel_course']}" styleClass="btn btn-danger" action="#{onlineDetailAction.doCancelTheCourse}" onclick="if(!confirm('#{messages['online_page_select_cancel_course_msg']}')){return false;}"/>
        	</div>	
        </div>
	</h:form>
	<script src="<%=request.getContextPath()%>/js/jquery-1.8.3.min.js"></script>
	<script src="<%=request.getContextPath()%>/js/bootstrap.js"></script>
	<script>
		$(function(){
			//标签
			$('#myTab a').click(function (e) {
			  	e.preventDefault();
			  	$(this).tab('show');
			});
			//document.getElementById('viewDiv').scrollIntoView();
		     
		});
		
		function showOutline(){
			 
		}
		
		var outline = false ;
		
		function onLoadOutline(){
			outlinep = '<%=outline%>' ;
			outlineUrl = '<%=outlineUrl%>' ;
			if(outline || outlinep == null || outlinep == '' || outlinep == 'null')
				return ;
			var flag = document.getElementById("formid:showEditOutlineFlagId").value;
		     if(!flag || flag == 'false'){
		    	 outline = true ;
		    	 var a  = '<%=outlineIsPDF%>' ;
		    	 if( a == 'true'){
		    		 $('#pdfDivID').show();
		    	 }else{
		    		 //document.write(tmh__make_ad_fodder(outlineUrl, 900, 800));
		    		 $('#viewerPlaceHolder').show();
		    		 $('#viewerPlaceHolder').html(tmh__make_ad_fodder(outlineUrl, 900, 800));
		    	 }
		     }else{
		     	$('#viewerPlaceHolder').hide();
		     	var val = document.getElementById("formid:hideOutlineId").value; 
		 	    document.getElementById("formid:showOutlineDiv").innerHTML = val ;
		     }
		}
		
		function onLoadEvalu(){
			var evalue = false ;
			var evalP = '<%=eval%>';
			if(evalue || evalP == null || evalP == '' || evalP == 'null')
				return ;
			flag = document.getElementById("formid:showEditEvaluationId").value;
		     if(!flag || flag == 'false'){
		    	 evalue = true ;
		    	 var a  = '<%=evaluIsPDF%>' ;
		    	 if( a == 'true'){
		    		 $('#pdfEvaluDivID').show();
		    	 }else{
		    		 var evaluUrl = '<%= evaluUrl%>' ;
		    		 $('#viewerEvaluDiv').show();
		    		 $('#viewerEvaluDiv').html(tmh__make_ad_fodder(evaluUrl, 900, 800));
		    	 }
		     }else{
		    		$('#viewerEvaluDiv').hide();
		    		document.getElementById("formid:showOEvauDiv").innerHTML = document.getElementById("formid:hideCourseEvaId").value;
		     } 
		}
		
		function tmh__make_ad_fodder(src, width, height){ 
        	src = src.replace(" ", ""); 
        	var TEMP_IMAGE = '<img src="'+src+'" height='+height+'" width="'+width+'" border="0" />'; 
        	var TEMP_FLASH = '<div id="viewerPlaceHolder" style="width:900px;height:800px;margin-left:100px"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ' 
        	+ ' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" ' 
        	+ ' height="'+height+'" width="'+width+'"> ' 
        	+ '<param name="movie" value="'+src+'" /> ' 
        	+ '<param name="quality" value="high" /> ' 
        	+ '<param name="wmode" value="opaque" /> ' 
        	+ '<EMBED src="'+src+'" quality="high" WIDTH="'+width+'" HEIGHT="'+height+'" ' 
        	+ ' wmode="opaque" TYPE="application/x-shockwave-flash" ' 
        	+ ' PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED> ' 
        	+ '</object></div>'; 
        	return (/\.swf$/gi.test(src) == true ? TEMP_FLASH : TEMP_IMAGE) 
        	.replace(/\$src\$/gi, src) 
        	.replace(/\$width\$/gi, width) 
        	.replace(/\$height\$/gi, height);
    	}
		
		$(function(){
			window.parent.window.webimUI.layout.addChat('room', document.getElementById("formid:courseId").value);
		});
	</script> 
	<script type="text/javascript">
		$(document).ready(function() {
			//document.getElementById('viewDiv').scrollIntoView();
		});
	</script>
</body>
</f:view>
</html>
